package com.atguigu.exer5_2;

public class TestEmployee {
    public static void main(String[] args) {
//        （4）在测试类TestEmployee中的main中，创建两个员工对象，并为他们的姓名和生日赋值，并显示员工的姓名和生日
        Employee e1 = new Employee();
        e1.setName("张三");

       /* MyDate date = new MyDate(1996,12,1);
        e1.setBirthday(date);*/

        //下面这句代码涉及到一个名词：匿名对象
        e1.setBirthday(new MyDate(1996,12,1));

        System.out.println("e1的信息：" + e1.getInfo());

        Employee e2 = new Employee();
        e2.setName("李四");

        MyDate my = new MyDate();
        my.setYear(2000);
        my.setMonth(6);
        my.setDay(1);
        e2.setBirthday(my);

        System.out.println("e2的信息：" + e2.getInfo());

        Employee e3 =new Employee("王五",2001,2,3);
        System.out.println("e3的信息：" + e3.getInfo());

    }
}
